package 狂神.GUI;

import java.awt.*;

/**
 * @ClassName: TestFlowLayOut
 * @Auther: Drawin
 * @Date: 2021/12/22 22:28
 * @Description:
 */

public class TestFlowLayOut {
    public static void main(String[] args) {
        Frame frame = new Frame();
        frame.setSize(220,220);
        frame.setVisible(true);

        //组件——按钮
        Button button1 = new Button("button");
        Button button2 = new Button("b");
        Button button3 = new Button("a");

        //设置流式布局
        //frame.setLayout(new FlowLayout());
        frame.setLayout(new FlowLayout(FlowLayout.RIGHT));

        //添加按钮
        frame.add(button1);
        frame.add(button2);
        frame.add(button3);


    }
}
